/* tslint:disable */

import { AuthenticationType, Feign, FeignRequestOptions, GetMapping, PostMapping } from 'fengwuxp-typescript-feign'
import { LoginReq } from '@/feign/user/req/LoginReq'
import { LoginUserInfo } from '@/feign/user/info/LoginUserInfo'


/**
 * 登录
 * */

@Feign({
  value: '/',
})
class UserService {

  @PostMapping({
    value: '/form/login',
    authenticationType: AuthenticationType.NONE
  })
  login!: (req: LoginReq, option?: FeignRequestOptions) => Promise<LoginUserInfo>


  @PostMapping({
    value: '/logout',
  })
  logout!: (req?: any, option?: FeignRequestOptions) => Promise<void>

  @PostMapping({
    value: '/oak_user/refresh_token',
  })
  refreshToken!: (req?: any, option?: FeignRequestOptions) => Promise<LoginUserInfo>

  @GetMapping({
    value: '/mobile/{userType}',
    authenticationType: AuthenticationType.TRY
  })
  getMobileCaptcha!: (req: {
    mobilePhone: string,
    userType: string;
  }, option?: FeignRequestOptions) => Promise<any>
}

export default new UserService()
